package com.leo.foodmaster.admin.tool.controller;

import cn.hutool.core.util.StrUtil;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * <p>
 * swagger 接口
 * </p>
 *
 * @author ：Leo
 * @since ：2021-06-25 9:59
 */
@Controller
@RequestMapping("tool")
public class SwaggerController {


    @GetMapping("swagger")
    public String index() {
        String url = "/swagger-ui.html";
        return redirect(url);
    }

    /**
     * 页面跳转
     */
    private String redirect(String url) {
        return StrUtil.format("redirect:{}", url);
    }
}
